<<<<<<< .mine
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>prngd: Prngd Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">prngd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_prngd.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_prngd-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Prngd Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Can generate random bits with the help of a BBS-generator or a ......  
 <a href="class_prngd.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_prngd_8h_source.html">Prngd.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Prngd:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd__coll__graph.png" border="0" usemap="#_prngd_coll__map" alt="Collaboration graph"/></div>
<map name="_prngd_coll__map" id="_prngd_coll__map">
<area shape="rect" id="node2" href="class_i_o_unit.html" title="Class for Input/Output File Operations. " alt="" coords="5,5,64,32"/><area shape="rect" id="node3" href="class_b_b_s.html" title="Blum Blum Shub pseudo random number generator. " alt="" coords="89,5,138,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af9e5cbd0e999ee052d90c39a213c5dba"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#af9e5cbd0e999ee052d90c39a213c5dba">Prngd</a> (Prngd_State <a class="el" href="class_prngd.html#aabcd69b3ba05afbf85dbe6e1d2fb91e6">state</a>)</td></tr>
<tr class="separator:af9e5cbd0e999ee052d90c39a213c5dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aede266348df7d7734e9e3826ad4ddf9d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aede266348df7d7734e9e3826ad4ddf9d">~Prngd</a> ()</td></tr>
<tr class="separator:aede266348df7d7734e9e3826ad4ddf9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a617fbe2be79677859235262d59b4c0f0"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0">work</a> (int param_count, char **params)</td></tr>
<tr class="separator:a617fbe2be79677859235262d59b4c0f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a651cac44aa2765c7428d2d89b0f8776c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a651cac44aa2765c7428d2d89b0f8776c">getResultSize</a> ()</td></tr>
<tr class="separator:a651cac44aa2765c7428d2d89b0f8776c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9e5848669332f0936a77b2db0c663c37"><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a9e5848669332f0936a77b2db0c663c37">getRndData</a> (int numberOfBits, bool <a class="el" href="class_prngd.html#aff241d903f4c1b35e61da830710a4cbe">useRandom</a>)</td></tr>
<tr class="separator:a9e5848669332f0936a77b2db0c663c37"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a07d9db50d295ba88184d0b0d3d191a06"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a07d9db50d295ba88184d0b0d3d191a06">readParameters</a> (int param_count, char **params)</td></tr>
<tr class="separator:a07d9db50d295ba88184d0b0d3d191a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aff241d903f4c1b35e61da830710a4cbe"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aff241d903f4c1b35e61da830710a4cbe">useRandom</a></td></tr>
<tr class="separator:aff241d903f4c1b35e61da830710a4cbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a960b30401c461a23e5ac0f201e1e1027"><td class="memItemLeft" align="right" valign="top">short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a960b30401c461a23e5ac0f201e1e1027">prngd_switch</a></td></tr>
<tr class="separator:a960b30401c461a23e5ac0f201e1e1027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50ec97e3dba6c8248a3f728a7b3c7845"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a50ec97e3dba6c8248a3f728a7b3c7845">seed_part2</a></td></tr>
<tr class="separator:a50ec97e3dba6c8248a3f728a7b3c7845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabcd69b3ba05afbf85dbe6e1d2fb91e6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aabcd69b3ba05afbf85dbe6e1d2fb91e6">state</a></td></tr>
<tr class="separator:aabcd69b3ba05afbf85dbe6e1d2fb91e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33b4aeff14c93d0346f32fb0628a4aaa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a33b4aeff14c93d0346f32fb0628a4aaa">bitCount</a></td></tr>
<tr class="separator:a33b4aeff14c93d0346f32fb0628a4aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e88337ad95c3bd5a518787a310cba9"><td class="memItemLeft" align="right" valign="top">std::string *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#ad0e88337ad95c3bd5a518787a310cba9">output_file</a></td></tr>
<tr class="separator:ad0e88337ad95c3bd5a518787a310cba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace490e877770aa0afa53cb46474a4992"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_b_b_s.html">BBS</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#ace490e877770aa0afa53cb46474a4992">bbs</a></td></tr>
<tr class="separator:ace490e877770aa0afa53cb46474a4992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f750749a33a877a38d34f207c419f3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_i_o_unit.html">IOUnit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a5f750749a33a877a38d34f207c419f3b">iounit</a></td></tr>
<tr class="separator:a5f750749a33a877a38d34f207c419f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d71db731cf89aca57f30bf1ef95191b"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a3d71db731cf89aca57f30bf1ef95191b">s</a></td></tr>
<tr class="separator:a3d71db731cf89aca57f30bf1ef95191b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5028b89d2ac673890096276be4a83695"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a5028b89d2ac673890096276be4a83695">s2</a></td></tr>
<tr class="separator:a5028b89d2ac673890096276be4a83695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0f31aa9e8540e9c9bc91252a61dfef"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a1c0f31aa9e8540e9c9bc91252a61dfef">output_bits</a></td></tr>
<tr class="separator:a1c0f31aa9e8540e9c9bc91252a61dfef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Can generate random bits with the help of a BBS-generator or a ...... </p>
<p><a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> uses a specific command line input to operate. Example: -o prngd_out -bbs 1024 -s 123456</p>
<p>The random bits will be stored in the file prngd_out (-o prngd_out) <a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> will generate 1025 pseudo random bits using a Blum Blum Shub generator. (-bbs 1024) <a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> will use the number 123456 to COMPUTE the initial seed for the generator. 123456 IS NOT the seed !. (-s 123456) </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af9e5cbd0e999ee052d90c39a213c5dba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Prngd::Prngd </td>
          <td>(</td>
          <td class="paramtype">Prngd_State&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<a class="anchor" id="aede266348df7d7734e9e3826ad4ddf9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Prngd::~Prngd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a651cac44aa2765c7428d2d89b0f8776c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::getResultSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After the generation of random bits you can use this function to get the size of the result in bytes. </p><dl class="section return"><dt>Returns</dt><dd>The size ot the result in bytes. </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph.png" border="0" usemap="#class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph" alt=""/></div>
<map name="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph" id="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph">
<area shape="rect" id="node2" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="200,5,364,32"/><area shape="rect" id="node3" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="200,56,364,83"/><area shape="rect" id="node4" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="199,107,365,133"/><area shape="rect" id="node5" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="199,157,365,184"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a9e5848669332f0936a77b2db0c663c37"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char * Prngd::getRndData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberOfBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>useRandom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Using dev/random for linux or Crypt API for Windows, to generate random data. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">numberOfByte</td><td>The value of how many bytes to generate. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph.png" border="0" usemap="#class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph" alt=""/></div>
<map name="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph" id="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph">
<area shape="rect" id="node2" href="class_b_b_s.html#adadf22f67593a49c880d4f0a22ef83dd" title="BBS::getBlumPrime" alt="" coords="185,81,324,108"/><area shape="rect" id="node5" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="709,107,800,133"/><area shape="rect" id="node3" href="class_b_b_s.html#a0659bff6844aaba740d202b8ca168ae1" title="BBS::create_M" alt="" coords="372,81,483,108"/><area shape="rect" id="node4" href="class_b_b_s.html#a698e05fd2f2968af4600fb160e7faeb7" title="BBS::generateBits" alt="" coords="531,81,661,108"/><area shape="rect" id="node6" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="849,5,1013,32"/><area shape="rect" id="node7" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="865,56,998,83"/><area shape="rect" id="node8" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="849,107,1013,133"/><area shape="rect" id="node9" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="848,157,1015,184"/><area shape="rect" id="node10" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="848,208,1015,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a07d9db50d295ba88184d0b0d3d191a06"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::readParameters </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Starts reading the command line parameters and filling our private variables. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of parameters. </td></tr>
    <tr><td class="paramname">argv</td><td>Two dimensional array of char with all the parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the parameters are valid or -1 if something is not ok. </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph.png" border="0" usemap="#class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph" alt=""/></div>
<map name="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph" id="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph">
<area shape="rect" id="node2" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="209,107,300,133"/><area shape="rect" id="node3" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="349,5,513,32"/><area shape="rect" id="node4" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="365,56,498,83"/><area shape="rect" id="node5" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="349,107,513,133"/><area shape="rect" id="node6" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="348,157,515,184"/><area shape="rect" id="node7" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="348,208,515,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a617fbe2be79677859235262d59b4c0f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * Prngd::work </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Main function of the prngd. Following steps will be executed:</p><ul>
<li>Read all parameters from command line.</li>
<li>Generate the seed.</li>
<li>Generate the random bits with the selected generator.</li>
<li>Write the random bits to an output file. <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of parameters. </td></tr>
    <tr><td class="paramname">argv</td><td>Two dimensional array of char with all the parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the parameters are valid or -1 if something is not ok. </dd></dl>
</li>
</ul>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph.png" border="0" usemap="#class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph" alt=""/></div>
<map name="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph" id="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph">
<area shape="rect" id="node2" href="class_prngd.html#a07d9db50d295ba88184d0b0d3d191a06" title="Prngd::readParameters" alt="" coords="144,5,300,32"/><area shape="rect" id="node3" href="class_prngd.html#a9e5848669332f0936a77b2db0c663c37" title="Prngd::getRndData" alt="" coords="693,81,825,108"/><area shape="rect" id="node4" href="class_b_b_s.html#a698e05fd2f2968af4600fb160e7faeb7" title="BBS::generateBits" alt="" coords="157,107,287,133"/><area shape="rect" id="node7" href="class_i_o_unit.html#aeff3307e483d37a668f06a136fade0b3" title="IOUnit::writeToFile" alt="" coords="158,157,286,184"/><area shape="rect" id="node5" href="class_b_b_s.html#a0659bff6844aaba740d202b8ca168ae1" title="BBS::create_M" alt="" coords="348,107,459,133"/><area shape="rect" id="node6" href="class_b_b_s.html#adadf22f67593a49c880d4f0a22ef83dd" title="BBS::getBlumPrime" alt="" coords="507,107,645,133"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph.png" border="0" usemap="#class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph" alt=""/></div>
<map name="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph" id="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph">
<area shape="rect" id="node2" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="145,5,309,32"/><area shape="rect" id="node3" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="161,56,294,83"/><area shape="rect" id="node4" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="145,107,309,133"/><area shape="rect" id="node5" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="144,157,311,184"/><area shape="rect" id="node6" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="144,208,311,235"/></map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ace490e877770aa0afa53cb46474a4992"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_b_b_s.html">BBS</a>* Prngd::bbs</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Object of the <a class="el" href="class_b_b_s.html" title="Blum Blum Shub pseudo random number generator. ">BBS</a> generator. </p>

</div>
</div>
<a class="anchor" id="a33b4aeff14c93d0346f32fb0628a4aaa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::bitCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The number of random bits. </p>

</div>
</div>
<a class="anchor" id="a5f750749a33a877a38d34f207c419f3b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_i_o_unit.html">IOUnit</a>* Prngd::iounit</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Object to read from or write to binary files. </p>

</div>
</div>
<a class="anchor" id="a1c0f31aa9e8540e9c9bc91252a61dfef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::output_bits</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>At the end it will have all generated random bits as one big integer. </p>

</div>
</div>
<a class="anchor" id="ad0e88337ad95c3bd5a518787a310cba9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string* Prngd::output_file</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Path and or file name of the file where the generated bits are saved to. </p>

</div>
</div>
<a class="anchor" id="a960b30401c461a23e5ac0f201e1e1027"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">short Prngd::prngd_switch</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Switch to select which generator should be used, constants are defined at <a class="el" href="_prngd_8h_source.html">Prngd.h</a>. </p>

</div>
</div>
<a class="anchor" id="a3d71db731cf89aca57f30bf1ef95191b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::s</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>First it's the user input, some time later it will be the generator seed. </p>

</div>
</div>
<a class="anchor" id="a5028b89d2ac673890096276be4a83695"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::s2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A second part of the seed, that will be linked to the user input with a xor-operation. </p>

</div>
</div>
<a class="anchor" id="a50ec97e3dba6c8248a3f728a7b3c7845"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char* Prngd::seed_part2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Variable s2 as a char Array. </p>

</div>
</div>
<a class="anchor" id="aabcd69b3ba05afbf85dbe6e1d2fb91e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::state</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Helps us to decide what we do with the output data (local writes it into a file, tcp will send it through the socket to the client) </p>

</div>
</div>
<a class="anchor" id="aff241d903f4c1b35e61da830710a4cbe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Prngd::useRandom</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>It it is set to true, the generator will try to use /dev/random otherwise it will always use /dev/urandom. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>H:/prngd_server/inc/<a class="el" href="_prngd_8h_source.html">Prngd.h</a></li>
<li>H:/prngd_server/src/Prngd.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_prngd.html">Prngd</a></li>
    <li class="footer">Generated on Fri Aug 29 2014 14:14:52 for prngd by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
=======
<<<<<<< .mine
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>prngd: Prngd Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">prngd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_prngd.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_prngd-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Prngd Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Can generate random bits with the help of a BBS-generator or a ......  
 <a href="class_prngd.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_prngd_8h_source.html">Prngd.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Prngd:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd__coll__graph.png" border="0" usemap="#_prngd_coll__map" alt="Collaboration graph"/></div>
<map name="_prngd_coll__map" id="_prngd_coll__map">
<area shape="rect" id="node2" href="class_i_o_unit.html" title="Class for Input/Output File Operations. " alt="" coords="5,5,64,32"/><area shape="rect" id="node3" href="class_b_b_s.html" title="Blum Blum Shub pseudo random number generator. " alt="" coords="89,5,138,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af9e5cbd0e999ee052d90c39a213c5dba"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#af9e5cbd0e999ee052d90c39a213c5dba">Prngd</a> (Prngd_State <a class="el" href="class_prngd.html#aabcd69b3ba05afbf85dbe6e1d2fb91e6">state</a>)</td></tr>
<tr class="separator:af9e5cbd0e999ee052d90c39a213c5dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aede266348df7d7734e9e3826ad4ddf9d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aede266348df7d7734e9e3826ad4ddf9d">~Prngd</a> ()</td></tr>
<tr class="separator:aede266348df7d7734e9e3826ad4ddf9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a617fbe2be79677859235262d59b4c0f0"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0">work</a> (int param_count, char **params)</td></tr>
<tr class="separator:a617fbe2be79677859235262d59b4c0f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a651cac44aa2765c7428d2d89b0f8776c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a651cac44aa2765c7428d2d89b0f8776c">getResultSize</a> ()</td></tr>
<tr class="separator:a651cac44aa2765c7428d2d89b0f8776c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9e5848669332f0936a77b2db0c663c37"><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a9e5848669332f0936a77b2db0c663c37">getRndData</a> (int numberOfBits, bool <a class="el" href="class_prngd.html#aff241d903f4c1b35e61da830710a4cbe">useRandom</a>)</td></tr>
<tr class="separator:a9e5848669332f0936a77b2db0c663c37"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a07d9db50d295ba88184d0b0d3d191a06"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a07d9db50d295ba88184d0b0d3d191a06">readParameters</a> (int param_count, char **params)</td></tr>
<tr class="separator:a07d9db50d295ba88184d0b0d3d191a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aff241d903f4c1b35e61da830710a4cbe"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aff241d903f4c1b35e61da830710a4cbe">useRandom</a></td></tr>
<tr class="separator:aff241d903f4c1b35e61da830710a4cbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a960b30401c461a23e5ac0f201e1e1027"><td class="memItemLeft" align="right" valign="top">short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a960b30401c461a23e5ac0f201e1e1027">prngd_switch</a></td></tr>
<tr class="separator:a960b30401c461a23e5ac0f201e1e1027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50ec97e3dba6c8248a3f728a7b3c7845"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a50ec97e3dba6c8248a3f728a7b3c7845">seed_part2</a></td></tr>
<tr class="separator:a50ec97e3dba6c8248a3f728a7b3c7845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabcd69b3ba05afbf85dbe6e1d2fb91e6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aabcd69b3ba05afbf85dbe6e1d2fb91e6">state</a></td></tr>
<tr class="separator:aabcd69b3ba05afbf85dbe6e1d2fb91e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33b4aeff14c93d0346f32fb0628a4aaa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a33b4aeff14c93d0346f32fb0628a4aaa">bitCount</a></td></tr>
<tr class="separator:a33b4aeff14c93d0346f32fb0628a4aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e88337ad95c3bd5a518787a310cba9"><td class="memItemLeft" align="right" valign="top">std::string *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#ad0e88337ad95c3bd5a518787a310cba9">output_file</a></td></tr>
<tr class="separator:ad0e88337ad95c3bd5a518787a310cba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace490e877770aa0afa53cb46474a4992"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_b_b_s.html">BBS</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#ace490e877770aa0afa53cb46474a4992">bbs</a></td></tr>
<tr class="separator:ace490e877770aa0afa53cb46474a4992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f750749a33a877a38d34f207c419f3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_i_o_unit.html">IOUnit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a5f750749a33a877a38d34f207c419f3b">iounit</a></td></tr>
<tr class="separator:a5f750749a33a877a38d34f207c419f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d71db731cf89aca57f30bf1ef95191b"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a3d71db731cf89aca57f30bf1ef95191b">s</a></td></tr>
<tr class="separator:a3d71db731cf89aca57f30bf1ef95191b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5028b89d2ac673890096276be4a83695"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a5028b89d2ac673890096276be4a83695">s2</a></td></tr>
<tr class="separator:a5028b89d2ac673890096276be4a83695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0f31aa9e8540e9c9bc91252a61dfef"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a1c0f31aa9e8540e9c9bc91252a61dfef">output_bits</a></td></tr>
<tr class="separator:a1c0f31aa9e8540e9c9bc91252a61dfef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Can generate random bits with the help of a BBS-generator or a ...... </p>
<p><a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> uses a specific command line input to operate. Example: -o prngd_out -bbs 1024 -s 123456</p>
<p>The random bits will be stored in the file prngd_out (-o prngd_out) <a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> will generate 1025 pseudo random bits using a Blum Blum Shub generator. (-bbs 1024) <a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> will use the number 123456 to COMPUTE the initial seed for the generator. 123456 IS NOT the seed !. (-s 123456) </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af9e5cbd0e999ee052d90c39a213c5dba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Prngd::Prngd </td>
          <td>(</td>
          <td class="paramtype">Prngd_State&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<a class="anchor" id="aede266348df7d7734e9e3826ad4ddf9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Prngd::~Prngd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a651cac44aa2765c7428d2d89b0f8776c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::getResultSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After the generation of random bits you can use this function to get the size of the result in bytes. </p><dl class="section return"><dt>Returns</dt><dd>The size ot the result in bytes. </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph.png" border="0" usemap="#class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph" alt=""/></div>
<map name="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph" id="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph">
<area shape="rect" id="node2" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="200,5,364,32"/><area shape="rect" id="node3" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="200,56,364,83"/><area shape="rect" id="node4" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="199,107,365,133"/><area shape="rect" id="node5" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="199,157,365,184"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a9e5848669332f0936a77b2db0c663c37"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char * Prngd::getRndData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberOfBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>useRandom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Using dev/random for linux or Crypt API for Windows, to generate random data. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">numberOfByte</td><td>The value of how many bytes to generate. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph.png" border="0" usemap="#class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph" alt=""/></div>
<map name="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph" id="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph">
<area shape="rect" id="node2" href="class_b_b_s.html#adadf22f67593a49c880d4f0a22ef83dd" title="BBS::getBlumPrime" alt="" coords="185,81,324,108"/><area shape="rect" id="node5" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="709,107,800,133"/><area shape="rect" id="node3" href="class_b_b_s.html#a0659bff6844aaba740d202b8ca168ae1" title="BBS::create_M" alt="" coords="372,81,483,108"/><area shape="rect" id="node4" href="class_b_b_s.html#a698e05fd2f2968af4600fb160e7faeb7" title="BBS::generateBits" alt="" coords="531,81,661,108"/><area shape="rect" id="node6" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="849,5,1013,32"/><area shape="rect" id="node7" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="865,56,998,83"/><area shape="rect" id="node8" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="849,107,1013,133"/><area shape="rect" id="node9" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="848,157,1015,184"/><area shape="rect" id="node10" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="848,208,1015,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a07d9db50d295ba88184d0b0d3d191a06"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::readParameters </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Starts reading the command line parameters and filling our private variables. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of parameters. </td></tr>
    <tr><td class="paramname">argv</td><td>Two dimensional array of char with all the parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the parameters are valid or -1 if something is not ok. </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph.png" border="0" usemap="#class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph" alt=""/></div>
<map name="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph" id="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph">
<area shape="rect" id="node2" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="209,107,300,133"/><area shape="rect" id="node3" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="349,5,513,32"/><area shape="rect" id="node4" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="365,56,498,83"/><area shape="rect" id="node5" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="349,107,513,133"/><area shape="rect" id="node6" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="348,157,515,184"/><area shape="rect" id="node7" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="348,208,515,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a617fbe2be79677859235262d59b4c0f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * Prngd::work </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Main function of the prngd. Following steps will be executed:</p><ul>
<li>Read all parameters from command line.</li>
<li>Generate the seed.</li>
<li>Generate the random bits with the selected generator.</li>
<li>Write the random bits to an output file. <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of parameters. </td></tr>
    <tr><td class="paramname">argv</td><td>Two dimensional array of char with all the parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the parameters are valid or -1 if something is not ok. </dd></dl>
</li>
</ul>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph.png" border="0" usemap="#class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph" alt=""/></div>
<map name="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph" id="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph">
<area shape="rect" id="node2" href="class_prngd.html#a07d9db50d295ba88184d0b0d3d191a06" title="Prngd::readParameters" alt="" coords="144,5,300,32"/><area shape="rect" id="node3" href="class_prngd.html#a9e5848669332f0936a77b2db0c663c37" title="Prngd::getRndData" alt="" coords="693,81,825,108"/><area shape="rect" id="node4" href="class_b_b_s.html#a698e05fd2f2968af4600fb160e7faeb7" title="BBS::generateBits" alt="" coords="157,107,287,133"/><area shape="rect" id="node7" href="class_i_o_unit.html#aeff3307e483d37a668f06a136fade0b3" title="IOUnit::writeToFile" alt="" coords="158,157,286,184"/><area shape="rect" id="node5" href="class_b_b_s.html#a0659bff6844aaba740d202b8ca168ae1" title="BBS::create_M" alt="" coords="348,107,459,133"/><area shape="rect" id="node6" href="class_b_b_s.html#adadf22f67593a49c880d4f0a22ef83dd" title="BBS::getBlumPrime" alt="" coords="507,107,645,133"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph.png" border="0" usemap="#class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph" alt=""/></div>
<map name="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph" id="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph">
<area shape="rect" id="node2" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="145,5,309,32"/><area shape="rect" id="node3" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="161,56,294,83"/><area shape="rect" id="node4" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="145,107,309,133"/><area shape="rect" id="node5" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="144,157,311,184"/><area shape="rect" id="node6" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="144,208,311,235"/></map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ace490e877770aa0afa53cb46474a4992"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_b_b_s.html">BBS</a>* Prngd::bbs</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Object of the <a class="el" href="class_b_b_s.html" title="Blum Blum Shub pseudo random number generator. ">BBS</a> generator. </p>

</div>
</div>
<a class="anchor" id="a33b4aeff14c93d0346f32fb0628a4aaa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::bitCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The number of random bits. </p>

</div>
</div>
<a class="anchor" id="a5f750749a33a877a38d34f207c419f3b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_i_o_unit.html">IOUnit</a>* Prngd::iounit</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Object to read from or write to binary files. </p>

</div>
</div>
<a class="anchor" id="a1c0f31aa9e8540e9c9bc91252a61dfef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::output_bits</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>At the end it will have all generated random bits as one big integer. </p>

</div>
</div>
<a class="anchor" id="ad0e88337ad95c3bd5a518787a310cba9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string* Prngd::output_file</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Path and or file name of the file where the generated bits are saved to. </p>

</div>
</div>
<a class="anchor" id="a960b30401c461a23e5ac0f201e1e1027"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">short Prngd::prngd_switch</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Switch to select which generator should be used, constants are defined at <a class="el" href="_prngd_8h_source.html">Prngd.h</a>. </p>

</div>
</div>
<a class="anchor" id="a3d71db731cf89aca57f30bf1ef95191b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::s</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>First it's the user input, some time later it will be the generator seed. </p>

</div>
</div>
<a class="anchor" id="a5028b89d2ac673890096276be4a83695"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::s2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A second part of the seed, that will be linked to the user input with a xor-operation. </p>

</div>
</div>
<a class="anchor" id="a50ec97e3dba6c8248a3f728a7b3c7845"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char* Prngd::seed_part2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Variable s2 as a char Array. </p>

</div>
</div>
<a class="anchor" id="aabcd69b3ba05afbf85dbe6e1d2fb91e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::state</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Helps us to decide what we do with the output data (local writes it into a file, tcp will send it through the socket to the client) </p>

</div>
</div>
<a class="anchor" id="aff241d903f4c1b35e61da830710a4cbe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Prngd::useRandom</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>It it is set to true, the generator will try to use /dev/random otherwise it will always use /dev/urandom. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>H:/prngd_server/inc/<a class="el" href="_prngd_8h_source.html">Prngd.h</a></li>
<li>H:/prngd_server/src/Prngd.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_prngd.html">Prngd</a></li>
    <li class="footer">Generated on Fri Aug 29 2014 14:14:52 for prngd by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
=======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>prngd: Prngd Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">prngd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_prngd.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_prngd-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Prngd Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Can generate random bits with the help of a BBS-generator or a ......  
 <a href="class_prngd.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_prngd_8h_source.html">Prngd.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Prngd:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd__coll__graph.png" border="0" usemap="#_prngd_coll__map" alt="Collaboration graph"/></div>
<map name="_prngd_coll__map" id="_prngd_coll__map">
<area shape="rect" id="node2" href="class_i_o_unit.html" title="Class for Input/Output File Operations. " alt="" coords="5,5,64,32"/><area shape="rect" id="node3" href="class_b_b_s.html" title="Blum Blum Shub pseudo random number generator. " alt="" coords="89,5,138,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af9e5cbd0e999ee052d90c39a213c5dba"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#af9e5cbd0e999ee052d90c39a213c5dba">Prngd</a> (Prngd_State <a class="el" href="class_prngd.html#aabcd69b3ba05afbf85dbe6e1d2fb91e6">state</a>)</td></tr>
<tr class="separator:af9e5cbd0e999ee052d90c39a213c5dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aede266348df7d7734e9e3826ad4ddf9d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aede266348df7d7734e9e3826ad4ddf9d">~Prngd</a> ()</td></tr>
<tr class="separator:aede266348df7d7734e9e3826ad4ddf9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a617fbe2be79677859235262d59b4c0f0"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0">work</a> (int param_count, char **params)</td></tr>
<tr class="separator:a617fbe2be79677859235262d59b4c0f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a651cac44aa2765c7428d2d89b0f8776c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a651cac44aa2765c7428d2d89b0f8776c">getResultSize</a> ()</td></tr>
<tr class="separator:a651cac44aa2765c7428d2d89b0f8776c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9e5848669332f0936a77b2db0c663c37"><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a9e5848669332f0936a77b2db0c663c37">getRndData</a> (int numberOfBits, bool <a class="el" href="class_prngd.html#aff241d903f4c1b35e61da830710a4cbe">useRandom</a>)</td></tr>
<tr class="separator:a9e5848669332f0936a77b2db0c663c37"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a07d9db50d295ba88184d0b0d3d191a06"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a07d9db50d295ba88184d0b0d3d191a06">readParameters</a> (int param_count, char **params)</td></tr>
<tr class="separator:a07d9db50d295ba88184d0b0d3d191a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aff241d903f4c1b35e61da830710a4cbe"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aff241d903f4c1b35e61da830710a4cbe">useRandom</a></td></tr>
<tr class="separator:aff241d903f4c1b35e61da830710a4cbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a960b30401c461a23e5ac0f201e1e1027"><td class="memItemLeft" align="right" valign="top">short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a960b30401c461a23e5ac0f201e1e1027">prngd_switch</a></td></tr>
<tr class="separator:a960b30401c461a23e5ac0f201e1e1027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50ec97e3dba6c8248a3f728a7b3c7845"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a50ec97e3dba6c8248a3f728a7b3c7845">seed_part2</a></td></tr>
<tr class="separator:a50ec97e3dba6c8248a3f728a7b3c7845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabcd69b3ba05afbf85dbe6e1d2fb91e6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#aabcd69b3ba05afbf85dbe6e1d2fb91e6">state</a></td></tr>
<tr class="separator:aabcd69b3ba05afbf85dbe6e1d2fb91e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33b4aeff14c93d0346f32fb0628a4aaa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a33b4aeff14c93d0346f32fb0628a4aaa">bitCount</a></td></tr>
<tr class="separator:a33b4aeff14c93d0346f32fb0628a4aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e88337ad95c3bd5a518787a310cba9"><td class="memItemLeft" align="right" valign="top">std::string *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#ad0e88337ad95c3bd5a518787a310cba9">output_file</a></td></tr>
<tr class="separator:ad0e88337ad95c3bd5a518787a310cba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace490e877770aa0afa53cb46474a4992"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_b_b_s.html">BBS</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#ace490e877770aa0afa53cb46474a4992">bbs</a></td></tr>
<tr class="separator:ace490e877770aa0afa53cb46474a4992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f750749a33a877a38d34f207c419f3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_i_o_unit.html">IOUnit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a5f750749a33a877a38d34f207c419f3b">iounit</a></td></tr>
<tr class="separator:a5f750749a33a877a38d34f207c419f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d71db731cf89aca57f30bf1ef95191b"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a3d71db731cf89aca57f30bf1ef95191b">s</a></td></tr>
<tr class="separator:a3d71db731cf89aca57f30bf1ef95191b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5028b89d2ac673890096276be4a83695"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a5028b89d2ac673890096276be4a83695">s2</a></td></tr>
<tr class="separator:a5028b89d2ac673890096276be4a83695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0f31aa9e8540e9c9bc91252a61dfef"><td class="memItemLeft" align="right" valign="top">mpz_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_prngd.html#a1c0f31aa9e8540e9c9bc91252a61dfef">output_bits</a></td></tr>
<tr class="separator:a1c0f31aa9e8540e9c9bc91252a61dfef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Can generate random bits with the help of a BBS-generator or a ...... </p>
<p><a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> uses a specific command line input to operate. Example: -o prngd_out -bbs 1024 -s 123456</p>
<p>The random bits will be stored in the file prngd_out (-o prngd_out) <a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> will generate 1025 pseudo random bits using a Blum Blum Shub generator. (-bbs 1024) <a class="el" href="class_prngd.html" title="Can generate random bits with the help of a BBS-generator or a ...... ">Prngd</a> will use the number 123456 to COMPUTE the initial seed for the generator. 123456 IS NOT the seed !. (-s 123456) </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af9e5cbd0e999ee052d90c39a213c5dba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Prngd::Prngd </td>
          <td>(</td>
          <td class="paramtype">Prngd_State&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<a class="anchor" id="aede266348df7d7734e9e3826ad4ddf9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Prngd::~Prngd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a651cac44aa2765c7428d2d89b0f8776c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::getResultSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After the generation of random bits you can use this function to get the size of the result in bytes. </p><dl class="section return"><dt>Returns</dt><dd>The size ot the result in bytes. </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph.png" border="0" usemap="#class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph" alt=""/></div>
<map name="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph" id="class_prngd_a651cac44aa2765c7428d2d89b0f8776c_icgraph">
<area shape="rect" id="node2" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="200,5,364,32"/><area shape="rect" id="node3" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="200,56,364,83"/><area shape="rect" id="node4" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="199,107,365,133"/><area shape="rect" id="node5" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="199,157,365,184"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a9e5848669332f0936a77b2db0c663c37"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char * Prngd::getRndData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberOfBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>useRandom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Using dev/random for linux or Crypt API for Windows, to generate random data. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">numberOfByte</td><td>The value of how many bytes to generate. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph.png" border="0" usemap="#class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph" alt=""/></div>
<map name="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph" id="class_prngd_a9e5848669332f0936a77b2db0c663c37_icgraph">
<area shape="rect" id="node2" href="class_b_b_s.html#adadf22f67593a49c880d4f0a22ef83dd" title="BBS::getBlumPrime" alt="" coords="185,81,324,108"/><area shape="rect" id="node5" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="709,107,800,133"/><area shape="rect" id="node3" href="class_b_b_s.html#a0659bff6844aaba740d202b8ca168ae1" title="BBS::create_M" alt="" coords="372,81,483,108"/><area shape="rect" id="node4" href="class_b_b_s.html#a698e05fd2f2968af4600fb160e7faeb7" title="BBS::generateBits" alt="" coords="531,81,661,108"/><area shape="rect" id="node6" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="849,5,1013,32"/><area shape="rect" id="node7" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="865,56,998,83"/><area shape="rect" id="node8" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="849,107,1013,133"/><area shape="rect" id="node9" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="848,157,1015,184"/><area shape="rect" id="node10" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="848,208,1015,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a07d9db50d295ba88184d0b0d3d191a06"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::readParameters </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Starts reading the command line parameters and filling our private variables. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of parameters. </td></tr>
    <tr><td class="paramname">argv</td><td>Two dimensional array of char with all the parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the parameters are valid or -1 if something is not ok. </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph.png" border="0" usemap="#class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph" alt=""/></div>
<map name="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph" id="class_prngd_a07d9db50d295ba88184d0b0d3d191a06_icgraph">
<area shape="rect" id="node2" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="209,107,300,133"/><area shape="rect" id="node3" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="349,5,513,32"/><area shape="rect" id="node4" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="365,56,498,83"/><area shape="rect" id="node5" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="349,107,513,133"/><area shape="rect" id="node6" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="348,157,515,184"/><area shape="rect" id="node7" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="348,208,515,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a617fbe2be79677859235262d59b4c0f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * Prngd::work </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Main function of the prngd. Following steps will be executed:</p><ul>
<li>Read all parameters from command line.</li>
<li>Generate the seed.</li>
<li>Generate the random bits with the selected generator.</li>
<li>Write the random bits to an output file. <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of parameters. </td></tr>
    <tr><td class="paramname">argv</td><td>Two dimensional array of char with all the parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the parameters are valid or -1 if something is not ok. </dd></dl>
</li>
</ul>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph.png" border="0" usemap="#class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph" alt=""/></div>
<map name="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph" id="class_prngd_a617fbe2be79677859235262d59b4c0f0_cgraph">
<area shape="rect" id="node2" href="class_prngd.html#a07d9db50d295ba88184d0b0d3d191a06" title="Prngd::readParameters" alt="" coords="144,5,300,32"/><area shape="rect" id="node3" href="class_prngd.html#a9e5848669332f0936a77b2db0c663c37" title="Prngd::getRndData" alt="" coords="693,81,825,108"/><area shape="rect" id="node4" href="class_b_b_s.html#a698e05fd2f2968af4600fb160e7faeb7" title="BBS::generateBits" alt="" coords="157,107,287,133"/><area shape="rect" id="node7" href="class_i_o_unit.html#aeff3307e483d37a668f06a136fade0b3" title="IOUnit::writeToFile" alt="" coords="158,157,286,184"/><area shape="rect" id="node5" href="class_b_b_s.html#a0659bff6844aaba740d202b8ca168ae1" title="BBS::create_M" alt="" coords="348,107,459,133"/><area shape="rect" id="node6" href="class_b_b_s.html#adadf22f67593a49c880d4f0a22ef83dd" title="BBS::getBlumPrime" alt="" coords="507,107,645,133"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph.png" border="0" usemap="#class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph" alt=""/></div>
<map name="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph" id="class_prngd_a617fbe2be79677859235262d59b4c0f0_icgraph">
<area shape="rect" id="node2" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="145,5,309,32"/><area shape="rect" id="node3" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="161,56,294,83"/><area shape="rect" id="node4" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="145,107,309,133"/><area shape="rect" id="node5" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="144,157,311,184"/><area shape="rect" id="node6" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="144,208,311,235"/></map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ace490e877770aa0afa53cb46474a4992"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_b_b_s.html">BBS</a>* Prngd::bbs</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Object of the <a class="el" href="class_b_b_s.html" title="Blum Blum Shub pseudo random number generator. ">BBS</a> generator. </p>

</div>
</div>
<a class="anchor" id="a33b4aeff14c93d0346f32fb0628a4aaa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::bitCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The number of random bits. </p>

</div>
</div>
<a class="anchor" id="a5f750749a33a877a38d34f207c419f3b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_i_o_unit.html">IOUnit</a>* Prngd::iounit</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Object to read from or write to binary files. </p>

</div>
</div>
<a class="anchor" id="a1c0f31aa9e8540e9c9bc91252a61dfef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::output_bits</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>At the end it will have all generated random bits as one big integer. </p>

</div>
</div>
<a class="anchor" id="ad0e88337ad95c3bd5a518787a310cba9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string* Prngd::output_file</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Path and or file name of the file where the generated bits are saved to. </p>

</div>
</div>
<a class="anchor" id="a960b30401c461a23e5ac0f201e1e1027"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">short Prngd::prngd_switch</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Switch to select which generator should be used, constants are defined at <a class="el" href="_prngd_8h_source.html">Prngd.h</a>. </p>

</div>
</div>
<a class="anchor" id="a3d71db731cf89aca57f30bf1ef95191b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::s</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>First it's the user input, some time later it will be the generator seed. </p>

</div>
</div>
<a class="anchor" id="a5028b89d2ac673890096276be4a83695"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mpz_t Prngd::s2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A second part of the seed, that will be linked to the user input with a xor-operation. </p>

</div>
</div>
<a class="anchor" id="a50ec97e3dba6c8248a3f728a7b3c7845"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char* Prngd::seed_part2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Variable s2 as a char Array. </p>

</div>
</div>
<a class="anchor" id="aabcd69b3ba05afbf85dbe6e1d2fb91e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Prngd::state</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Helps us to decide what we do with the output data (local writes it into a file, tcp will send it through the socket to the client) </p>

</div>
</div>
<a class="anchor" id="aff241d903f4c1b35e61da830710a4cbe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Prngd::useRandom</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>It it is set to true, the generator will try to use /dev/random otherwise it will always use /dev/urandom. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>H:/prngd_server/inc/<a class="el" href="_prngd_8h_source.html">Prngd.h</a></li>
<li>H:/prngd_server/src/Prngd.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_prngd.html">Prngd</a></li>
    <li class="footer">Generated on Sun Aug 31 2014 18:01:31 for prngd by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
>>>>>>> .r39
>>>>>>> .r46
